package db

import (
	"zstackgo/spring"

	"gorm.io/gorm"
)

var (
	Dbf *DatabaseFacadeImpl
)

func init() {
	o := new(DatabaseFacadeImpl)
	spring.Register(o, "databaseFacade", []*spring.PluginExtension{
		{
			Interface: "header.Component",
		},
	})
}

type DatabaseFacadeImpl struct {
	engine *gorm.DB
}

func (impl *DatabaseFacadeImpl) GetEntityManager() *gorm.DB {
	return impl.engine
}
